3.1.53 \(\int \csc ^4(c+d x) (a+a \sec (c+d x))^3 \, dx\) [53]

3.1.53.1 Optimal result
3.1.53.2 Mathematica [B] (verified)
3.1.53.3 Rubi [A] (verified)
3.1.53.4 Maple [A] (verified)
3.1.53.5 Fricas [A] (verification not implemented)
3.1.53.6 Sympy [F]
3.1.53.7 Maxima [A] (verification not implemented)
3.1.53.8 Giac [A] (verification not implemented)
3.1.53.9 Mupad [B] (verification not implemented)

3.1.53.1 Optimal result

Integrand size = 21, antiderivative size = 110 \[ \int \csc ^4(c+d x) (a+a \sec (c+d x))^3 \, dx=\frac {11 a^3 \text {arctanh}(\sin (c+d x))}{2 d}-\frac {2 a^3 \sin (c+d x)}{3 d (1-\cos (c+d x))^2}-\frac {17 a^3 \sin (c+d x)}{3 d (1-\cos (c+d x))}+\frac {3 a^3 \tan (c+d x)}{d}+\frac {a^3 \sec (c+d x) \tan (c+d x)}{2 d} \]

output
11/2*a^3*arctanh(sin(d*x+c))/d-2/3*a^3*sin(d*x+c)/d/(1-cos(d*x+c))^2-17/3* 
a^3*sin(d*x+c)/d/(1-cos(d*x+c))+3*a^3*tan(d*x+c)/d+1/2*a^3*sec(d*x+c)*tan( 
d*x+c)/d
 
3.1.53.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(290\) vs. \(2(110)=220\).

Time = 6.71 (sec) , antiderivative size = 290, normalized size of antiderivative = 2.64 \[ \int \csc ^4(c+d x) (a+a \sec (c+d x))^3 \, dx=\frac {a^3 (1+\cos (c+d x))^3 \sec ^6\left (\frac {1}{2} (c+d x)\right ) \left (-4 \cot \left (\frac {c}{2}\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right )-66 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+66 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-2 (-19+17 \cos (c+d x)) \csc \left (\frac {c}{2}\right ) \csc ^3\left (\frac {1}{2} (c+d x)\right ) \sin \left (\frac {d x}{2}\right )+\frac {3}{\left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {36 \sin \left (\frac {d x}{2}\right )}{\left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}-\frac {3}{\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {36 \sin \left (\frac {d x}{2}\right )}{\left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}\right )}{96 d} \]

input
Integrate[Csc[c + d*x]^4*(a + a*Sec[c + d*x])^3,x]
 
output
(a^3*(1 + Cos[c + d*x])^3*Sec[(c + d*x)/2]^6*(-4*Cot[c/2]*Csc[(c + d*x)/2] 
^2 - 66*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 66*Log[Cos[(c + d*x)/2] 
 + Sin[(c + d*x)/2]] - 2*(-19 + 17*Cos[c + d*x])*Csc[c/2]*Csc[(c + d*x)/2] 
^3*Sin[(d*x)/2] + 3/(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])^2 + (36*Sin[(d*x 
)/2])/((Cos[c/2] - Sin[c/2])*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])) - 3/(C 
os[(c + d*x)/2] + Sin[(c + d*x)/2])^2 + (36*Sin[(d*x)/2])/((Cos[c/2] + Sin 
[c/2])*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]))))/(96*d)
 
3.1.53.3 Rubi [A] (verified)

Time = 0.50 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.05, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3042, 4360, 25, 25, 3042, 25, 3351, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \csc ^4(c+d x) (a \sec (c+d x)+a)^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\left (a-a \csc \left (c+d x-\frac {\pi }{2}\right )\right )^3}{\cos \left (c+d x-\frac {\pi }{2}\right )^4}dx\)

\(\Big \downarrow \) 4360

\(\displaystyle \int \csc ^4(c+d x) \sec ^3(c+d x) \left (-(a (-\cos (c+d x))-a)^3\right )dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int -(\cos (c+d x) a+a)^3 \csc ^4(c+d x) \sec ^3(c+d x)dx\)

\(\Big \downarrow \) 25

\(\displaystyle \int \csc ^4(c+d x) \sec ^3(c+d x) (a \cos (c+d x)+a)^3dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int -\frac {\left (a-a \sin \left (c+d x-\frac {\pi }{2}\right )\right )^3}{\sin \left (c+d x-\frac {\pi }{2}\right )^3 \cos \left (c+d x-\frac {\pi }{2}\right )^4}dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \frac {\left (a-a \sin \left (\frac {1}{2} (2 c-\pi )+d x\right )\right )^3}{\cos \left (\frac {1}{2} (2 c-\pi )+d x\right )^4 \sin \left (\frac {1}{2} (2 c-\pi )+d x\right )^3}dx\)

\(\Big \downarrow \) 3351

\(\displaystyle -a^4 \int \left (-\frac {\sec ^3(c+d x)}{a}-\frac {3 \sec ^2(c+d x)}{a}-\frac {5 \sec (c+d x)}{a}-\frac {5}{a (1-\cos (c+d x))}-\frac {2}{a (1-\cos (c+d x))^2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -a^4 \left (-\frac {11 \text {arctanh}(\sin (c+d x))}{2 a d}-\frac {3 \tan (c+d x)}{a d}+\frac {17 \sin (c+d x)}{3 a d (1-\cos (c+d x))}+\frac {2 \sin (c+d x)}{3 a d (1-\cos (c+d x))^2}-\frac {\tan (c+d x) \sec (c+d x)}{2 a d}\right )\)

input
Int[Csc[c + d*x]^4*(a + a*Sec[c + d*x])^3,x]
 
output
-(a^4*((-11*ArcTanh[Sin[c + d*x]])/(2*a*d) + (2*Sin[c + d*x])/(3*a*d*(1 - 
Cos[c + d*x])^2) + (17*Sin[c + d*x])/(3*a*d*(1 - Cos[c + d*x])) - (3*Tan[c 
 + d*x])/(a*d) - (Sec[c + d*x]*Tan[c + d*x])/(2*a*d)))
 

3.1.53.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3351
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) 
 + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[1/a^p   Int[Expan 
dTrig[(d*sin[e + f*x])^n*(a - b*sin[e + f*x])^(p/2)*(a + b*sin[e + f*x])^(m 
 + p/2), x], x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && In 
tegersQ[m, n, p/2] && ((GtQ[m, 0] && GtQ[p, 0] && LtQ[-m - p, n, -1]) || (G 
tQ[m, 2] && LtQ[p, 0] && GtQ[m + p/2, 0]))
 

rule 4360
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_))^(m_.), x_Symbol] :> Int[(g*Cos[e + f*x])^p*((b + a*Sin[e + f*x])^m/Si 
n[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]
 
3.1.53.4 Maple [A] (verified)

Time = 1.49 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.14

method result size
parallelrisch \(-\frac {11 a^{3} \left (\left (1+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\left (-\cos \left (2 d x +2 c \right )-1\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {17 \csc \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (\cos \left (d x +c \right )-\frac {71 \cos \left (2 d x +2 c \right )}{102}+\frac {13 \cos \left (3 d x +3 c \right )}{51}-\frac {65}{102}\right ) \cot \left (\frac {d x}{2}+\frac {c}{2}\right )}{11}\right )}{2 d \left (1+\cos \left (2 d x +2 c \right )\right )}\) \(125\)
norman \(\frac {-\frac {a^{3}}{3 d}-\frac {16 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{3 d}+\frac {56 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{3 d}-\frac {11 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}-\frac {11 a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {11 a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) \(135\)
risch \(-\frac {i a^{3} \left (33 \,{\mathrm e}^{6 i \left (d x +c \right )}-99 \,{\mathrm e}^{5 i \left (d x +c \right )}+154 \,{\mathrm e}^{4 i \left (d x +c \right )}-210 \,{\mathrm e}^{3 i \left (d x +c \right )}+161 \,{\mathrm e}^{2 i \left (d x +c \right )}-123 \,{\mathrm e}^{i \left (d x +c \right )}+52\right )}{3 d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {11 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d}+\frac {11 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d}\) \(147\)
derivativedivides \(\frac {a^{3} \left (-\frac {1}{3 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{2}}+\frac {5}{6 \sin \left (d x +c \right ) \cos \left (d x +c \right )^{2}}-\frac {5}{2 \sin \left (d x +c \right )}+\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+3 a^{3} \left (-\frac {1}{3 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )}+\frac {4}{3 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {8 \cot \left (d x +c \right )}{3}\right )+3 a^{3} \left (-\frac {1}{3 \sin \left (d x +c \right )^{3}}-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a^{3} \left (-\frac {2}{3}-\frac {\csc \left (d x +c \right )^{2}}{3}\right ) \cot \left (d x +c \right )}{d}\) \(185\)
default \(\frac {a^{3} \left (-\frac {1}{3 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{2}}+\frac {5}{6 \sin \left (d x +c \right ) \cos \left (d x +c \right )^{2}}-\frac {5}{2 \sin \left (d x +c \right )}+\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+3 a^{3} \left (-\frac {1}{3 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )}+\frac {4}{3 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {8 \cot \left (d x +c \right )}{3}\right )+3 a^{3} \left (-\frac {1}{3 \sin \left (d x +c \right )^{3}}-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a^{3} \left (-\frac {2}{3}-\frac {\csc \left (d x +c \right )^{2}}{3}\right ) \cot \left (d x +c \right )}{d}\) \(185\)

input
int(csc(d*x+c)^4*(a+a*sec(d*x+c))^3,x,method=_RETURNVERBOSE)
 
output
-11/2*a^3*((1+cos(2*d*x+2*c))*ln(tan(1/2*d*x+1/2*c)-1)+(-cos(2*d*x+2*c)-1) 
*ln(tan(1/2*d*x+1/2*c)+1)-17/11*csc(1/2*d*x+1/2*c)^2*(cos(d*x+c)-71/102*co 
s(2*d*x+2*c)+13/51*cos(3*d*x+3*c)-65/102)*cot(1/2*d*x+1/2*c))/d/(1+cos(2*d 
*x+2*c))
 
3.1.53.5 Fricas [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.62 \[ \int \csc ^4(c+d x) (a+a \sec (c+d x))^3 \, dx=-\frac {104 \, a^{3} \cos \left (d x + c\right )^{4} - 38 \, a^{3} \cos \left (d x + c\right )^{3} - 118 \, a^{3} \cos \left (d x + c\right )^{2} + 30 \, a^{3} \cos \left (d x + c\right ) + 6 \, a^{3} - 33 \, {\left (a^{3} \cos \left (d x + c\right )^{3} - a^{3} \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) + 33 \, {\left (a^{3} \cos \left (d x + c\right )^{3} - a^{3} \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right )}{12 \, {\left (d \cos \left (d x + c\right )^{3} - d \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )} \]

input
integrate(csc(d*x+c)^4*(a+a*sec(d*x+c))^3,x, algorithm="fricas")
 
output
-1/12*(104*a^3*cos(d*x + c)^4 - 38*a^3*cos(d*x + c)^3 - 118*a^3*cos(d*x + 
c)^2 + 30*a^3*cos(d*x + c) + 6*a^3 - 33*(a^3*cos(d*x + c)^3 - a^3*cos(d*x 
+ c)^2)*log(sin(d*x + c) + 1)*sin(d*x + c) + 33*(a^3*cos(d*x + c)^3 - a^3* 
cos(d*x + c)^2)*log(-sin(d*x + c) + 1)*sin(d*x + c))/((d*cos(d*x + c)^3 - 
d*cos(d*x + c)^2)*sin(d*x + c))
 
3.1.53.6 Sympy [F]

\[ \int \csc ^4(c+d x) (a+a \sec (c+d x))^3 \, dx=a^{3} \left (\int 3 \csc ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 3 \csc ^{4}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \csc ^{4}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int \csc ^{4}{\left (c + d x \right )}\, dx\right ) \]

input
integrate(csc(d*x+c)**4*(a+a*sec(d*x+c))**3,x)
 
output
a**3*(Integral(3*csc(c + d*x)**4*sec(c + d*x), x) + Integral(3*csc(c + d*x 
)**4*sec(c + d*x)**2, x) + Integral(csc(c + d*x)**4*sec(c + d*x)**3, x) + 
Integral(csc(c + d*x)**4, x))
 
3.1.53.7 Maxima [A] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 188, normalized size of antiderivative = 1.71 \[ \int \csc ^4(c+d x) (a+a \sec (c+d x))^3 \, dx=-\frac {a^{3} {\left (\frac {2 \, {\left (15 \, \sin \left (d x + c\right )^{4} - 10 \, \sin \left (d x + c\right )^{2} - 2\right )}}{\sin \left (d x + c\right )^{5} - \sin \left (d x + c\right )^{3}} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 6 \, a^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{2} + 1\right )}}{\sin \left (d x + c\right )^{3}} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 12 \, a^{3} {\left (\frac {6 \, \tan \left (d x + c\right )^{2} + 1}{\tan \left (d x + c\right )^{3}} - 3 \, \tan \left (d x + c\right )\right )} + \frac {4 \, {\left (3 \, \tan \left (d x + c\right )^{2} + 1\right )} a^{3}}{\tan \left (d x + c\right )^{3}}}{12 \, d} \]

input
integrate(csc(d*x+c)^4*(a+a*sec(d*x+c))^3,x, algorithm="maxima")
 
output
-1/12*(a^3*(2*(15*sin(d*x + c)^4 - 10*sin(d*x + c)^2 - 2)/(sin(d*x + c)^5 
- sin(d*x + c)^3) - 15*log(sin(d*x + c) + 1) + 15*log(sin(d*x + c) - 1)) + 
 6*a^3*(2*(3*sin(d*x + c)^2 + 1)/sin(d*x + c)^3 - 3*log(sin(d*x + c) + 1) 
+ 3*log(sin(d*x + c) - 1)) + 12*a^3*((6*tan(d*x + c)^2 + 1)/tan(d*x + c)^3 
 - 3*tan(d*x + c)) + 4*(3*tan(d*x + c)^2 + 1)*a^3/tan(d*x + c)^3)/d
 
3.1.53.8 Giac [A] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.12 \[ \int \csc ^4(c+d x) (a+a \sec (c+d x))^3 \, dx=\frac {33 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 33 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {6 \, {\left (5 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 7 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2}} - \frac {2 \, {\left (18 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a^{3}\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}}}{6 \, d} \]

input
integrate(csc(d*x+c)^4*(a+a*sec(d*x+c))^3,x, algorithm="giac")
 
output
1/6*(33*a^3*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 33*a^3*log(abs(tan(1/2*d* 
x + 1/2*c) - 1)) - 6*(5*a^3*tan(1/2*d*x + 1/2*c)^3 - 7*a^3*tan(1/2*d*x + 1 
/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^2 - 2*(18*a^3*tan(1/2*d*x + 1/2*c)^2 + 
 a^3)/tan(1/2*d*x + 1/2*c)^3)/d
 
3.1.53.9 Mupad [B] (verification not implemented)

Time = 18.20 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.05 \[ \int \csc ^4(c+d x) (a+a \sec (c+d x))^3 \, dx=\frac {11\,a^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {11\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-\frac {56\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}+\frac {16\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}+\frac {a^3}{3}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\right )} \]

input
int((a + a/cos(c + d*x))^3/sin(c + d*x)^4,x)
 
output
(11*a^3*atanh(tan(c/2 + (d*x)/2)))/d - ((16*a^3*tan(c/2 + (d*x)/2)^2)/3 - 
(56*a^3*tan(c/2 + (d*x)/2)^4)/3 + 11*a^3*tan(c/2 + (d*x)/2)^6 + a^3/3)/(d* 
(tan(c/2 + (d*x)/2)^3 - 2*tan(c/2 + (d*x)/2)^5 + tan(c/2 + (d*x)/2)^7))